<template>
	<view :class="model+'-wrap flex flex-column'">
		<!-- :class="'p-sticky-'+model" -->
		<view>
			<view class="status_bar">
				
			</view>
			<view class="nav_bar flex align-center">
				<view @click="$tool.goBack()" class="f0 p-3">
					<image class="fanhui_icon" :src="'/static/images/fanhui_'+model+'.png'" mode=""></image>
				</view>
			</view>
		</view>
		<view class="flex-1 flex flex-column align-center justify-between">
			<view class="flex flex-column align-center mt-8">
				<view class="f0">
					<image class="headerImg" :src="'/static/images/headerImg_'+model+'.png'" mode=""></image>
				</view>
				<view class="title A-Bold mt-3" :class="model=='light'?'titleLight':''">
					***8，{{i18n.l025}}
				</view>
			</view>
			<view class="f0 pb-8" style="padding-bottom: 280rpx;">
				<image class="faceIcon clickCss" :src="'/static/images/faceIcon_'+model+'.png'" mode=""></image>
			</view>
			<view class="flex flex-column align-center">
				<view @click="submit" class="faceLogin clickCss A-Medium">
					{{i18n.l026}}
				</view>
				<view @click="$tool.goBack()" class="mt-3 A-Medium passLogin">
					{{i18n.l020}}
				</view>
			</view>
		</view>
	</view>
	
</template>

<script>
	import {
		addFace
	} from '@/core/api/user.js';
	export default {
		data() {
			return {
				img:"http://szsc.laobailianmeng.com/digital-mall/1722094712818_Screenshot_20240716_103027_1722094698288.jpg",
				type:1,
			}
		},
		onLoad(options) {
			if(options.type){
				this.type = options.type;
			}
		},
		onReady() {
			this.$tool.setStatusBarStyle(this.model);
		},
		computed: {
			i18n() {
				return this.$t('login');
			},
			model() {
				return this.$store.state.config.model;
			}
		},
		methods: {
			submit(){
				// addFace({
				// 	faceImg:this.img,
				// 	mobileUserId:uni.getStorageSync('mobileUserId')
				// }).then(res=>{
					
				// })
				this.$tool.navTo('./camera?type='+this.type)
			}
		}
	}
</script>

<style scoped lang="scss">
	.headerImg {
		width: 128rpx;
		height: 128rpx;
	}
	.title {
		font-size: 36rpx;
		color: #F7F7F7;
	}
	.titleLight {
		color: #0E0F11;
	}
	.faceIcon {
		width: 112rpx;
		height: 112rpx;
	}
	.faceLogin {
		padding: 0 78rpx;
		height: 80rpx;
		background: #5951BA;
		border-radius: 40rpx;
		font-size: 28rpx;
		color: #F7F7F7;
		line-height: 80rpx;
	}
	.passLogin {
		font-size: 28rpx;
		color: #7F838D;
		margin-bottom: 15vh;
	}
</style>
